<?php
namespace app\admin\validate;
use think\Validate;

class Category extends Validate
{
    protected $rule = [
        'id' => 'require',
        'tid' => 'require',
        'title' => 'require',
        'des' => 'require|number',
        'hideleft' => 'require',
        'hideright' => 'require'
    ];

    protected $message = [
        'id.require' => '缺少必要参数',
        'tid.require' => '请选择菜单位置',
        'title.require' => '菜单名称不能为空',
        'des.require' => '菜单排序不能为空',
        'des.number' => '菜单排序只能是数字',
        'hideleft.require' => '菜单左边不能为空',
        'hideright.require' => '菜单右边不能为空',
    ];
}